from db.invoiceData import InvoiceData
from handlers.myhandler import *

class InvoiceHandler(JSONHandler):

	def safeGet(self, user, **params):
		return InvoiceData.getInvoiceData(user, **params)

	def safePost(self, user, **params):
		return InvoiceData.newInvoice(user, **params)

	def safeDelete(self, user, **params):
		print params
		InvoiceData.deleteInvoiceData(user, **params)
		return InvoiceData.getInvoiceData(user)

	def safePut(self, user, **params):
		return InvoiceData.newInvoice(user, **params)